...even when scheduled to run on the current physical cpu. This
ensures that locks get dropped correctly before executing the
continuation code, and also allows the original caller to determine
whether the continuation has/will execute based on c_h_o_c()'s
immediate return code.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
if ( (cpu >= NR_CPUS) || !cpu_online(cpu) )
return -EINVAL;
- if ( cpu == smp_processor_id() )
- return func(data);
-
info = this_cpu(continue_info);
if ( info == NULL )
{
bool_t domctl_lock_acquire(void);
void domctl_lock_release(void);
-/* Continue the current hypercall via func(data) on specified cpu. */
+/*
+ * Continue the current hypercall via func(data) on specified cpu.
+ * If this function returns 0 then the function is guaranteed to run at some
+ * point in the future. If this function returns an error code then the
+ * function has not been and will not be executed.
+ */
int continue_hypercall_on_cpu(
unsigned int cpu, long (*func)(void *data), void *data);